package 字符串;

public class numDecodings {

    public int numDecodings(String s) {
        int n=s.length();
        int[] dp = new int[n+1];
        dp[0]=1;
        for (int i=1;i<=n;++i){
            if(s.charAt(i-1)>='1' && s.charAt(i-1)<='9'){
                dp[i]=dp[i-1];
            }
            if(i>1 && (s.charAt(i-1)-'0')+(s.charAt(i-2)-'0')*10<=26){
                dp[i]+=dp[i-2];
            }
        }

        return 0;
    }

    public static void main(String[] args) {
        System.out.println();
    }
}
